$("#tcBox1").on('click', '.checkboxStyle', function () {
    $(this).children().attr('checked','true');
    $(this).addClass('selection').parent().siblings().children('.checkboxStyle').removeClass('selection');
});
$("#tcBox2").on('click', '.checkboxStyle', function () {
    $(this).children().attr('checked','true');
    $(this).addClass('selection').parent().siblings().children('.checkboxStyle').removeClass('selection');
});
$("#submission").click(function () {
    var fieldTc = $("input[name='about1']:checked").val();
    if(fieldTc == "" || fieldTc == null){
        alert("请选择离职TC！");
        return;
    }
    var tcName = $("input[name='about2']:checked").val();
    if(tcName == "" || tcName == null){
        alert("请选择继承TC！");
        return;
    }
    var remarks = $("#remarks").val();
    if(remarks == "" || remarks == null){
        alert("请填写备注！");
        return;
    }
    if(confirm("确定要更换Tc么？")) {
        $.ajax({
            url: Feng.ctxPath + '/customer/batchChoiceTc',
            dataType: 'json',
            type: "post",
            data: {
                "fieldTc": fieldTc,
                "remarks": remarks,
                "tcName": tcName
            },
            success: function (data) {
                alert('修改成功!');
                window.parent.Customer.table.refresh();
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            },
            error:function (data) {alert("没有权限，请联系系统管理员！");}
        });
    }else {return;}
});